Week 4 Computer Lab Worksheet
Generalised linear models
Aims
In this lab you will practice fitting various types of generalised linear models. These models generalise linear regression to situations where the outcome (dependent) variable is not drawn from a normal (Gaussian) distribution. We will look at examples of logit/probit, Poisson, and ordered/unordered categorical (multinomial) models. Given the diversity of models that we aim to cover, we will be using several data sources. Continuing the idea of causal estimation from week 3, we start with data underpinning the article by Ladd and Lenz (2009) and will attempt to replicate a simpler version of their probit model (see their Table 1A). We then fit a Poisson model with data from Weiss et al. (2021), attempting to replicate their Table S6. In two further exercises we will use data from Wave 5 (2017-2021) of the European Values Study and recoded versions of the LaddLenz dataset to practice ordinal and multinomial regression. Given the wide range of exercises, you will probably need to be selective with what you aim to achieve in class, and which exercises you would leave to complete outside class.
By the end of the session, you will:
- learn how to fit logit, probit, Poisson, ordinal and multinomial regression models
- gain experience summarising, visualising and interpreting results from these models
- practice further data manipulation techniques